package com.mlm.mlmapp.adapter.view;

import android.content.Context;
import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

public class GridMarginDecoration extends RecyclerView.ItemDecoration {
  private int left;
  private int right;
  private int top;
  private int bottom;

  public GridMarginDecoration(Context context, int left, int right, int top, int bottom) {

    this.left = left;
    this.right = right;
    this.top = top;
    this.bottom = bottom;
  }
  public GridMarginDecoration(Context context, float left, float right, float top, float bottom) {

	    this.left = (int)left;
	    this.right = (int)right;
	    this.top = (int)top;
	    this.bottom = (int)bottom;
	  }
  @Override
  public void getItemOffsets(
      Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
    outRect.set(left, top, right, bottom);
  }
}